package se.webbzon.boltzmann.battle.object.spawner;

import se.webbzon.boltzmann.environment.AbstractEnvironment;
import se.webbzon.boltzmann.environment.EnvironmentInflator;
import se.webbzon.oschi01.worldeditor.WorldObjectDeflation;
import se.webbzon.oschi01.worldobject.WorldObject;

public class BattleSpawnerInflator extends EnvironmentInflator {
	
	/*============================================================
	Constructors
	============================================================*/

	/** Creates a new BattleSpawnerInflator. **/
	public BattleSpawnerInflator(AbstractEnvironment env) {
		super(env,BattleSpawner.worldObjectName);
	}
	
	/*============================================================
	Constructors
	============================================================*/
	
	@Override public WorldObject makeWorldObject(WorldObjectDeflation deflation) {
		BattleSpawner spawner = ((BattleSpawnerDeflation) deflation).makeSpawner();
		if (getEnvironment().isDebugMode())
			spawner.setVisible(true);
		else
			spawner.setVisible(false);
		return spawner;
	}

	@Override public WorldObjectDeflation makeDeflation(int deflationProperties, WorldObject[] dependencies) {
		return new BattleSpawnerDeflation(deflationProperties);
	}

}
